﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ProductIsShow.ascx.cs" Inherits="Controls_ProductIsShow" %>
<%@ Import Namespace="DTO" %>
<script src="<%=Globals.ApplicationPath%>Jquery/jquery.js" type="text/javascript"></script>
<script src="<%=Globals.ApplicationPath%>Jquery/main.js" type="text/javascript"></script>

<style>
#preview{
	position:absolute;
	border:1px solid #ccc;
	background:#333;
	padding:5px;
	display:none;
	color:#fff;
	}
</style>

 <asp:DataList ID="dtlProducts" EnableTheming="False" runat="server" DataSourceID="objShowProducts"
       DataKeyField="ID" GridLines="Horizontal" Width="100%" RepeatColumns="3" ItemStyle-HorizontalAlign="Center" 
    BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
    CellPadding="4" ForeColor="Black">
       <SelectedItemStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
       <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
       <ItemTemplate>
            <table cellpadding="6" cellspacing="6" >
                <tr>
                    <td class="titleProduct" align="center">
                        <asp:HyperLink runat="server" ID="hplTitle" Text='<%#Eval("Title")%>' NavigateUrl='<%#"~/ShowProduct.aspx?ID="+Eval("ID") %>' />
                    </td>
                </tr>
                <tr>
                    <td align="center">
                        <a href='<%#Eval("FullImageUrl") %>' target="_blank" class="preview"><img src='<%#Eval("SmallImageUrl")%>' width="140px" alt="gallery thumbnail" />
                    </td>
                 </tr>
                <tr>
                    <td align="center">
                        <div class="details">
                            <asp:HyperLink  runat="server" ID="hplDetail" Text="xem chi tiết..." NavigateUrl='<%#"~/ShowProduct.aspx?ID="+Eval("ID") %>' />                        
                        </div>
                    </td>
                </tr>
            </table>
       </ItemTemplate>
       <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
       <ItemStyle BorderColor="Orange" />
</asp:DataList>
<asp:ObjectDataSource runat="server" ID="objShowProducts" 
    TypeName="BLL.Store.Product" SelectMethod="GetProductIsShow">
    <SelectParameters>
        <asp:Parameter DefaultValue="True" Name="isshow" Type="Boolean" />
    </SelectParameters>
</asp:ObjectDataSource>